1. Field of the Invention
The invention relates generally to data transmission in a Fibre Channel network and more particularly, but not by way of limitation, to techniques for measuring the time required to send data over a particular high-speed link.
2. Description of the Related Art
As used herein, the term “Fibre Channel” refers to the Fibre Channel family of standards promulgated by the American National Standards Institute as ANSI X.3/T11. In general, Fibre Channel defines a high-speed serial transport system that uses a hierarchically structured information exchange protocol consisting of frames, sequences and exchanges. A “frame” is the atomic unit of data transmission between two communicating devices. A “sequence” is a set of one or more related data frames transmitted unidirectionally from one device to another device within an exchange. An “exchange” is the basic construct for coordinating the transfer of information between communicating devices during higher layer protocol operations such as Small Computer System Interface (SCSI) and Transport Control Protocol/Internet Protocol (TCP/IP).
Referring to FIG. 1, communication between end devices or nodes such as server 100, storage unit 105, databases 110 and loop 115 (itself comprised of devices, not shown) is mediated by “fabric” 120, a term which refers to one or more operatively coupled Fibre Channel switches, e.g., 125, 130 and 135.
Fibre Channel defines three topologies, namely Point-to-Point, Arbitrated Loop, and Fabric. A Point-to-Point topology is the simplest of the three. It consists of two and only two Fibre channel devices connected directly together. The transmit fibre of one device goes to the receive fibre of the other device, and vice versa. There is no sharing of the media, which allows the devices to enjoy the total bandwidth of the link. A simple link initialization is required of the two devices before communication can begin. The Fabric topology is used to connect many (up to 224) devices in a switched configuration. The benefit of this topology is that many devices can communicate at the same time; the media is not shared. It requires the use of one or more switches which dynamically route data between devices by establishing links between nodes. Routing algorithms typically require information concerning the round trip delay of switch-toswitch links. Measuring the round trip delay of switch-to-switch links also enables link-to-link skew calculations for trunking. A prior art method of measuring the round trip delay of a switch-to-switch link is illustrated in FIG. 2 in block diagram form.
The round trip delay is measured by transmitting a particular Primitive Signal. A Primitive Signal is an Ordered Set used to indicate an event. An Ordered Set is a 4-byte Transmission Word which has the Special Character as its first Transmission Character. An Ordered Set may be a Frame Delimited, a Primitive Signal, or a Primitive Sequence. Ordered Sets are used to distinguish Fibre Channel control information from data. A Transmission Word is a string of four consecutive Transmission Characters—a (valid or invalid) 10-bit character transmitted serially over the fibre. Valid Transmission Characters are determined by the 8B/10B encoding specification. The Special Character is a special 10-bit Transmission Character which does not have a corresponding 8-bit value, but is still considered valid. The Special Character is used to indicate that a particular Transmission Word is an Ordered Set. The Special Character is the only Transmission Character to have five 1's or 0's in a row. The Special Character is also referred to as K28.5 when using K/D format. For additional explanation of these various terms, one may refer to the Fibre Channel standards, particularly FC-PH, which is ANSI publication X3.230, and is hereby incorporated by reference.
In one particular method employed by the prior art, the MARK (or MRK) primitive signal is used as the transmitted ordered set. This Primitive Signal nominally applies only to the Arbitrated Loop topology and in that use is defined in the FC-AL specification ANSI X3.272-1996, which is hereby incorporated by reference. It is intended to be transmitted by an L Port for synchronization purposes and its use is vendor specific. It may be appropriated for use in point-to-point timing measurements.
As shown at Block 202 in FIG. 2a, a unique Timing Primitive Signal (TPS) is selected and written to a register (Block 204). In order for the link round trip measurement to be performed, a switch must retransmit TPS's other than those it originates. To allow this to happen, TPS retransmission must be enabled in the responding switch while this procedure is taking place [Block 206]. The TPS is transmitted to the remote switch [Block 208] and the Link Round Trip Timer is simultaneously started [Block 210].
The process shown in FIG. 2b may be implemented in hardware logic circuits. The Link Round Trip Timer will run until a TPS is received [Block 220] that matches the contents of the TPS stored in the register [Block 222] at which point it will stop [Block 226], optionally generating an interrupt. At this point, the value in the Link Round Trip Timer register will contain a number corresponding to the link round trip delay between adjacent switches. If the TPS received does not match the contents of the TPS value register [the N branch of Diamond 222] and the retransmission function is enabled [the Y branch of Diamond 223], the TPS received is retransmitted [Block 224] inasmuch as the switch at the other end of the inter-switch link may be simultaneously performing a link round trip measurement.
In one particular embodiment, each count in the Link Round Trip Timer represents one cycle of a 106.25 MHz clock. If the Link Round Trip Timer Register comprises 19 bits, it follows that this counter can measure the link round trip delay in cables of nearly 2000 kilometers using a typical propagation delay of 500 microseconds for a 200-kilometer fiber optic cable.
In the illustrated embodiment of the prior art, the timer will also stop, generating a “timer not running” interrupt, if the original TPS is not received before the Link Round Trip Timer reaches terminal count. Thus, a “timer not running” interrupt with a terminal count in the timer register may be used as an indication of a lost TPS for error detection and recovery, if desired. An implementation of this process is illustrated in block form in FIG. 2c where a “timer not running interrupt” is detected [the Y branch of Diamond 232], the timer register read [Block 238] and if a terminal count is found [Y branch of Diamond 240], error detection and recovery routines are initiated [Block 244].
A successful link round trip timing measurement will produce less than terminal count in the Link Round Trip Timer Register [the N branch of Diamond 240] and the link round trip delay may be computed from the count in the Link Round Trip Timer Register and the clock rate [Block 242]. To prevent endless recycling of unwanted TPS's, retransmission of TPS's should be disabled [Block 236] unless a link round trip measurement is being performed.
One disadvantage of this prior art method is that in order for the link round trip measurement to be performed, each switch must retransmit any TPS that it did not originate. Thus, an orphan TPS—i.e., a TPS which (due perhaps to data corruption) does not match the value stored in the register of an originating switch will be endlessly recycled until TPS retransmission is disabled if both switches are attempting to perform link round trip timing, such as may occur during link startup. Such unwanted recycling consumes valuable bandwidth in the communications system. The present invention solves this problem.